-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Added staticfiles panel class. #494
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
👍 |
from django.contrib.staticfiles.templatetags import staticfiles | ||
|
||
from django.utils.translation import ungettext, ugettext_lazy as _ | ||
from django.utils.datastructures import SortedDict |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Future-proof version:
try:
from collections import OrderedDict
except ImportError:
from django.utils.datastructures import SortedDict as OrderedDict
Both versions currently exist in the code base :-/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(all of them btw)
- adds some docstrings - adds some basic tests - adds the staticfiles panel to the default list of panels - fixed a pluralization bug in the template - refactored some things into own methods for easier testing
…level monkey patching.
Frankly I don't know why that one test fails on Travis, it works locally with Tox. |
Unfortunately that matches my experience with Travis :( |
I wonder if it's somehow related to the test environments running side by side? In other words, is this an indicator for the code not being threadsafe? |
The diff looks pretty good, my feedback would be in the realm of "keep deps sorted alphabetically". So, assuming |
Added staticfiles panel class.
…cfiles Added staticfiles panel class.
Just a quick dump of my current WIP, @aaugustin. Tests and docs are missing but I'll work on them this week before we do a final release.